package tv.scolopender.runnable;

import java.util.ArrayList;

import tv.scolopender.adapter.ScoloArrayAdapter;
import tv.scolopender.model.Scolo;
import android.app.Activity;

public class UpdateScoloAdapter implements Runnable {
	private final ScoloArrayAdapter scoloAdapter;
	private final ArrayList<Scolo> scolos;
	private final Activity activity;

	public UpdateScoloAdapter(ScoloArrayAdapter scoloAdapter,
			ArrayList<Scolo> scolos, Activity activity) {
		super();
		this.scoloAdapter = scoloAdapter;
		this.scolos = scolos;
		this.activity = activity;
	}

	@Override
	public void run() {
		scoloAdapter.addAll(scolos);
		activity.setProgressBarIndeterminateVisibility(false);
	}

}